'''
@Company: TWL
@Author: xue jian
@Email: xuejian@kanzhun.com
@Date: 2020-01-16 18:07:40
'''
import os
import sys
import json
sys.path.append(os.path.abspath(os.path.join(os.path.dirname('__file__'), os.path.pardir)))

import thrift
from thrift.transport import TSocket
from thrift.transport import TTransport
from thrift.protocol import TBinaryProtocol
from hulk_proxy.HulkProxyServ import Client
from scan_data.ttypes import ScanData

__HOST = "172.21.32.54"
__PORT = 10088

try:
    tsocket = TSocket.TSocket(__HOST, __PORT)
    transport = TTransport.TFramedTransport(tsocket)
    protocol = TBinaryProtocol.TBinaryProtocol(transport)
    client = Client(protocol)

    transport.open()
    '''
    @note: write the information of the exposure info.
    '''
    boss_list = client.hget('boss_list_feature', 'hulkProxy_tcmcp')
    geek_list = client.hget('geek_list_feature', 'hulkProxy_tcmcp')

    print('boss_list:', boss_list)
    print('geek_list:', geek_list)

    transport.close()
except thrift.TException as ex:
    print(ex.message)